package com.easonji.common.constant.dictmap;

import com.easonji.common.constant.dictmap.base.AbstractDictMap;

/**
 * @ClassName: UserDict
 * @Description: 用户的字典（记录日志AOP用）
 * @Author: LiuJun
 * @date: 2018/07/18 17:37
 * @Version: 1.0
 * @Copyright: Copyright (c) 2018 - 2019
 */
public class UserDict extends AbstractDictMap {

    @Override
    public void init() {
        put("userId", "账号");
        put("account", "账号");
        put("name", "名字");
        put("birthday", "生日");
        put("sex", "性别");
        put("phoneNum", "电话");
        put("deptId", "部门名称");
        put("roleIds", "角色名称集合");
        put("appIds", "应用名称集合");
    }

    @Override
    protected void initBeWrapped() {
        putFieldWrapperMethodName("sex", "ConstsFactory.getSexName");
        putFieldWrapperMethodName("deptId", "DeptManager.getDeptNameById");
        putFieldWrapperMethodName("userId", "UserManager.getUserAccountById");
        putFieldWrapperMethodName("roleIds", "RoleManager.getRoleNamesByIds");
        putFieldWrapperMethodName("appIds", "AppManager.getAppNamesByIds");
    }
}
